import { Controller, Get, Inject, Query } from '@midwayjs/core';
import { Context } from '@midwayjs/koa';
import { WalletService } from '../service/wallet.service';

@Controller('/wallet')
export class WalletController {

  @Inject()
  walletService: WalletService;
  @Inject()
  ctx: Context;

  @Get('/info')
  async getWalletInfo(@Query('addr') addr:string) {
    return this.walletService.getWallet(addr);
    // this.ctx.body = this.walletService.getWallet(addr);
  }
}
